/**
 * 公用参数
 */

var doctor='';//医生

/**
 * 默认加载
 * @type {{init: Window.process.init, public: Window.process.public}}
 */
window.process = {
    init: function () {
        this.initData();
        this.public();
    },
    initData:function () {
        var paramsData = getUrlParamsCode();
        doctor= paramsData['doctor'];
        if(doctor){
            $('.doctor').html(doctor);
        }


    },
    public: function () {
        //添加图片
        $("#imgFile").localResizeIMG({
            width: 500,
            quality: 0.8,
            success: function (result) {
                var length=$('#upImg img').length;
                if(length<3){
                    var data= result.base64;
                    var html='<img src="'+data+'" />';
                    $('#upImg p').remove();
                    $('#upImg').append(html);
                }else{
                    $.alert('最多只能上传三张图片')
                }

            }
        });
        //选择结果
        $('.ask .list li').click(function () {
            $(this).addClass('on').siblings().removeClass('on');
        });
        //选择医生
        $('#doctor').click(function () {
           window.location.href='../detail/inquiry.html?sel=1';
        });

    }

};

/**
 * 启动方法执行
 */
process.init();



